﻿' Compiler Options:
Option Explicit On
Option Strict On
Option Infer Off


' NOTE: MustInherit - Specifies that a class can be used only as a base class and that you cannot create an object directly from it.
'
'       MSDN DEFINITION:
'                       The purpose of a base class (also known as an abstract class) is to define functionality that is common to all 
'                       the classes derived from it. This saves the derived classes from having to redefine the common elements. In some 
'                       cases, this common functionality is not complete enough to make a usable object, and each derived class defines 
'                       the missing functionality. In such a case, you want the consuming code to create objects only from the derived classes. 
'                       You use MustInherit on the base class to enforce this.



Public MustInherit Class WordMW

    ' NOTE: Protected - Specifies that one or more declared programming elements are accessible only from within 
    '       their own class or from a derived class.
    '       I want the wordValue etc to be written to by the derived classes.

    ' TODOMW: Do Word, Context, Definition need to be ReadOnly.
    Private wordValue As String
    Public Property word() As String
        Get
            Return wordValue
        End Get
        Set(value As String)
            wordValue = value
        End Set
    End Property

    Private contextValue As String
    Public Property context() As String
        Get
            Return contextValue
        End Get
        Set(value As String)
            contextValue = value
        End Set
    End Property


    Private definitionValue As String
    Public Property definition() As String
        Get
            Return definitionValue
        End Get
        Set(value As String)
            definitionValue = value
        End Set
    End Property


    Private currentCharacterValue As Char
    Public Property currentCharacter() As Char
        Get
            Return currentCharacterValue
        End Get
        Set(value As Char)
            currentCharacterValue = value
        End Set
    End Property

    Private wordCompleteValue As Boolean
    Public Property wordComplete() As Boolean
        Get
            Return wordCompleteValue
        End Get
        Set(value As Boolean)
            wordCompleteValue = value
        End Set
    End Property


    Private currentCharactersCorrectValue As String
    Public Property currentCharactersCorrect() As String
        Get
            Return currentCharactersCorrectValue
        End Get

        Set(value As String)
            currentCharactersCorrectValue = value
        End Set
    End Property

    Private characterIndexValue As Integer
    Public Property characterIndex() As Integer
        Get
            Return characterIndexValue
        End Get

        Set(value As Integer)
            characterIndexValue = value
        End Set
    End Property


    Private hintGivenValue As Boolean
    Public Property hintGiven() As Boolean
        Get
            Return hintGivenValue
        End Get

        Set(value As Boolean)
            hintGivenValue = value
        End Set
    End Property



    ' TODOMW: Test only delete later.
    'Public Sub New()

    '    ' TODOMW:   Test code only to fill one word. 
    '    '           Implement getting a word list array. 

    '    wordValue = "Happy"
    '    contextValue = "I am happy to see you."
    '    definitionValue = "Feeling or showing pleasure or contentment."
    '    currentCharacterValue = CChar(word.Substring(characterIndex))
    'End Sub


End Class
